Option Explicit
'ۭqҲ
'nǳ2TextBoxB٦1ListBox
Dim myCBar As CommandBar
Private Sub UserForm_Initialize()
    Dim myCbarCnt As CommandBarButton
    With ListBox1
        .AddItem "aaa"
        .AddItem "bbb"
        .AddItem "ccc"
    End With
    On Error Resume Next
    CommandBars("UFtmp").Delete
    On Error GoTo 0
    'wW٨ӷsWOC]k^
    Set myCBar = CommandBars.Add("UFtmp", msoBarPopup, False, True)
    With myCBar.Controls.Add(Type:=msoControlButton)
        .Caption = "ƻs"
        .OnAction = "J_Sample016_Copy"
    End With
    With myCBar.Controls.Add(Type:=msoControlButton)
        .Caption = "KW"
        .OnAction = "J_Sample016_Paste"
    End With
End Sub

Private Sub UserForm_Terminate()
    On Error Resume Next
    CommandBars("UFtmp").Delete
    On Error GoTo 0
End Sub

Private Sub TextBox1_MouseUp(ByVal Button As Integer, _
                             ByVal Shift As Integer, _
                             ByVal X As Single, _
                             ByVal Y As Single)
    If Button = 2 Then
        myCBar.Controls(2).Enabled = TextBox1.CanPaste
        myCBar.ShowPopup
        Button = 0
    End If
End Sub

Private Sub TextBox2_MouseUp(ByVal Button As Integer, _
                             ByVal Shift As Integer, _
                             ByVal X As Single, _
                             ByVal Y As Single)
    If Button = 2 Then
        myCBar.Controls(2).Enabled = TextBox2.CanPaste
        myCBar.ShowPopup
        Button = 0
    End If
End Sub

Private Sub Listbox1_MouseUp(ByVal Button As Integer, _
                             ByVal Shift As Integer, _
                             ByVal X As Single, _
                             ByVal Y As Single)
    If Button = 2 Then
        myCBar.Controls(2).Enabled = False
        myCBar.ShowPopup
        Button = 0
    End If
End Sub

'зǼҲ
Sub J_Sample016_Copy()
    Dim mydataobj As New DataObject
    With UserForm1.ActiveControl
       Select Case Left(.Name, 4)
            Case "Text", "Comb"
                .Copy
            Case Else
                mydataobj.SetText .Value
                mydataobj.PutInClipboard
        End Select
    End With
    Set mydataobj = Nothing
End Sub

Sub J_Sample016_Paste()
    With UserForm1.ActiveControl
        Select Case Left(.Name, 4)
            Case "Text", "Comb"
            If .CanPaste Then .Paste
            Case Else
        End Select
    End With
End Sub

Sub ufshow()
    UserForm1.Show
End Sub